tools: fix inverted logic check
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 25 Jun 2009 12:15:32 +0000 (13:15 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 25 Jun 2009 12:15:32 +0000 (13:15 +0100)
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
tools/python/xen/xend/XendConfig.py

index 398e73e78e6b7f02dec62ba034c9a1f257b8801d..9cced961a8298866b998df891bef65608bcd2d38 100644 (file)
@@ -463,9 +463,11 @@ class XendConfig(dict):
             if 'device_model' not in self['platform']:
                 self['platform']['device_model'] = auxbin.pathTo("qemu-dm")
             # device_model may be set to 'qemu-dm' or 'stubdom-dm' w/o a path
-            if os.path.dirname(self['platform']['device_model']) != "":
+            if os.path.dirname(self['platform']['device_model']) == "":
                 self['platform']['device_model'] = \
                     auxbin.pathTo(self['platform']['device_model'])
+            if not os.path.exists(self['platform']['device_model']):
+                raise VmError("device model '%s' not found" % str(self['platform']['device_model']))
 
         if self.is_hvm():
             if 'timer_mode' not in self['platform']: